package main

import (
	"fmt"
	"log"
	"time"

	"github.com/robfig/cron/v3"
)

func main() {
	c := cron.New()

	_, err := c.AddFunc("@every 1m", func() {
		fmt.Printf("%s:执行\n", time.Now().Format("2006-01-02 15:04:05"))
	})
	if err != nil {
		log.Println(err)
		return
	}

	c.Start()

	for {

	}
}
